package cc.rengu.redp.bizimpl.upmp.service;

import cc.rengu.redp.common.domain.QueryRequest;
import cc.rengu.redp.common.exception.RedpException;
import cc.rengu.redp.bizimpl.upmp.domain.CupsInstInfo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.transaction.annotation.Transactional;

import java.util.Map;

/**
 * @author LiuYuLiang.LL
 */
public interface CupsInstInfoService extends IService<CupsInstInfo> {

    IPage<CupsInstInfo> findByPage(QueryRequest request, CupsInstInfo info);

    @Transactional
    void create(CupsInstInfo entity) throws RedpException;

    @Transactional
    void update(CupsInstInfo entity) throws RedpException;

    @Transactional
    void audit(CupsInstInfo entity, String opt, String approvalRefuseReason) throws RedpException;

    @Transactional
    void cancel(String id) throws RedpException;

    @Transactional
    void delete(String[] ids);

    Map<String, Object> select2(String q, QueryRequest request);
}
